{% extends "blog/base.html" %}
{% block title %}分享一个好文章{% endblock %}
{% block content %}
    <div class="share">
        <div class="container-xl">
            {% if sent %}
            <h1>邮件发送</h1>
            <p>"{{ post.title  }}" 已成功发送到 {{ form.cleaned_data.to }}</p>
            {% else %}
            <h1>将 "{{ post.title }} 分享至朋友email</h1>
            <form action="." method="post">
                {{ form.as_p }}
                {% csrf_token %}
                <input type="submit" value="发送" >
            </form>
            {% endif %}
        </div>
    </div>
{% endblock %}